home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
tutor
/
dosguide.exe
/
HELPDOS.ZIP
/
COPY.HLP
< prev
next >
Wrap
Text File
|
1985-09-10
|
7KB
|
165 lines
------------------------- COPY - Internal DOS Command ------------------------
COPY copies one or more files between disks or other devices.
FORMAT: COPY [/A][/B][d1:][path1]filename1[.ext1][/A][/B]
[d2:][path2][filename[.ext]][/A][/B][/V]
or, to concatenate files during the copy:
COPY [/A][/B][d1:][path1]filename1[.ext1][/A][/B]
[+[[,,]d1:][path1]filename1[.ext][/A][/B]...]
[d2:][path2][filename2[.ext]][/A][/B][/V]
REMARKS:
Source File(s):
d1 - the drive letter of the disk whose file is to be copied. If
omitted, the default drive is assumed.
path1 - the directory path of the directory containing the file to be
copied. If omitted, the current directory is assumed.
filename1 - the filename of the file to be copied.
.ext1 - the filename extension of the file to be copied.
Target File(s):
d2 - the drive letter of the disk which will receive the copied
file. If omitted, the default drive is assumed.
path2 - the directory path of the directory which will receive the
copied file. If omitted, the current directory is assumed.
filename2 - the filename of the new copy of the file.
.ext2 - the filename extension of the new copy of the file.
Global characters (* and ?) are allowed in all filenames and extensions.
If a target file exists, it will be replaced with the copied file.
When copying to the same disk, new filenames must be given unless the copying
is done into another directory.
If the target is a directory (a path is specified but filename.ext is
omitted), then files are copied into that directory without changing their
names.
When copying to another disk or to a directory on the same disk, the original
filenames may be retained or they may be changed.
When concatenating (combining) files, if a target filename is not given, the
files are combined and given the name of the first source file.
If a file to be copied is marked as read-only, the resultant copy will not be
marked as read-only.
[,,] is a special parameter used to update the directory entry for a single
file with the current date and time. It must be used with the + parameter
(see example below). Global characters (* and ?) may not be used in this
special form of COPY.
/V added at the end causes verification that the copy is recorded correctly.
This performs the same function as the VERIFY ON command. If VERIFY is ON,
then /V is redundant. COPY will run more slowly with verification on.
/A and /B - with /A, COPY treats the file as a text (ASCII) file. With /B,
COPY treats the file as a program file (binary). If neither /A or /B is
specified, and files are not copied with concatenation, then /B is assumed.
If files are concatenated, then /A is assumed. The effect of these two
parameters depends on their position in the command:
Used with source files:
/A - treats the file as a text (ASCII) file. Copies all
information up to, but not including, the end-of-file
marker (CTRL-Z). Information after the end-of-file marker
is ignored.
/B - treats the file as binary and copies the entire file,
including the end-of-file marker (CTRL-Z).
Used with target files:
/A - adds an end-of-file marker to the end of the file.
/B - does not add an end-of-file marker.
/A and /B apply to the file or files immediately preceding the /A or
/B specification. These parameters may also be placed before the
first source filename. /A and /B stay in effect until another /A or
/B is encountered in the command line.
COPY can also be used to copy files between system devices (see last two
examples below). The COM and AUX devices may not be specified.
WARNING: If the target file already exists, the COPY command will replace its
contents with the contents of the source file. The COPY command does not
inform you that this will occur.
EXAMPLES:
Copy the file FILE1.DAT from the current directory on drive A to the current
directory on drive B. The copied file is to have the same name as the original.
The default drive is A:
COPY FILE1.DAT B:
Copy the file FILE1.DAT from the current directory on drive A to the current
directory on drive B. The copied file is to have the name FILE1.BAK on the
drive B disk:
COPY FILE1.DAT B:FILE1.BAK
Copy all files in the DATA directory on drive C disk that have a filename
extension of .DAT. The files are copied to the current directory on drive A.
The copies will have the same names as the originals. The DATA directory is a
subdirectory of the root directory:
COPY C:\DATA\*.DAT A:
Copy all files in the current directory on drive B that have a six character
filename where the first four characters are "ACCT," and a filename extension of
.DAT. The files are to be copied to the current directory on drive A. The /V
parameter is specified to ensure that the copied file can be read without error:
COPY B:ACCT??.DAT A:/V
Copy and combine (concatenate) the files MEMO1, MEMO2 and MEMO3. These files
are in the current directory of the default drive and are to be copied as
MEMOS.BAK to the root directory of drive B:
COPY MEMO1+MEMO2+MEMO3 B:\MEMOS.BAK
Update the directory entry for file MYFILE with the current time and date.
MYFILE is in the current directory on the default drive:
COPY MYFILE+,,
Create the file AUTOEXEC.BAT in the root directory of the default drive by using
COPY to copy keyboard input to the file. The file is to have one line,
PATH \HELPDOS:
COPY CON: \AUTOEXEC.BAT
PATH \HELPDOS
You must press F6 (to denote end-of-file) and then RETURN to end this
type of copy operation. If you have reassigned the standard meaning
of F6, then press the key you have assigned to CTRL-Z (instead of F6).
COPY keyboard input directly to the printer. The printer is device LPT1:
COPY CON: LPT1:
This is a test of printing what is typed on the keyboard.
This is useful for "quick notes."
You must press F6 (to denote end-of-file) and then RETURN to end this
type of copy operation. If you have reassigned the standard meaning
of F6, then press the key you have assigned to CTRL-Z (instead of F6).